#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,sys
path = 'E:/web-repo/wwwroot'
files = os.listdir(path)
files.sort()

label = ''
for one in files:
    if one in ['index.html','left.html','top.html','right.html']:
        continue
    if one.endswith('.html'):
        
        a = '<a href="%s" target = "rightFrame" >%s</a></br>\n'%(one,one.split('.')[0])
        label = label+a
#
html = '<html>\n<body >\ncontent\n</body>\n</html>\n'
html = html.replace('content',label)
#write
with open(path+'/left.html','w') as f:
    f.write(html)
    
    

